﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace PayrollSystemLibrary.Model
{
    public  partial  class Employee :  IValidatableObject
    {
        public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
        {
            if (string.IsNullOrEmpty(this.Name) )
            {
                yield return new ValidationResult("You must enter a Name", new[] { "Name"});
            }
        }
    }
}
